// Copyright 2009 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef POPDIAG_UI_THANKSSCREEN_H__
#define POPDIAG_UI_THANKSSCREEN_H__

#include <QtGui/QtGui>
#include "ui/browser.h"
#include "probes/probe.h"

namespace popdiag {

class ThanksScreen : public QWizardPage {
  Q_OBJECT;
  public:
  explicit ThanksScreen(QWidget *parent);
  virtual ~ThanksScreen();

  virtual void cleanupPage();
  virtual void initializePage();

  void SetupUI();

  public slots:
  void ReportSaved(const QString &path);
  void DisplayFaults(const ProbeSet::Storage &probes);

  private:
  void UpdateFaults();

  QLabel       *completed_label_;
  QLabel       *issues_label_;
  Browser      *details_;
  Browser      *log_link_;
  QString       text_report_filepath_;
  ProbeSet::Storage probes_;
};
}  // namespace popdiag

#endif  // POPDIAG_UI_THANKSSCREEN_H__
